﻿using Abp.Application.Services;
using Abp.Domain.Repositories;
using Abp.Linq.Extensions;
using AbpVueDemo.System_management.DepartmentManagement.DepartmentmanagementDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AbpVueDemo.System_management.DepartmentManagement
{
  public  class DepartmentService : AsyncCrudAppService<Departmentmanager, DepartmentInputDto, int, PageDepartmentRequestDto, DepartmentCteateDto, DepartmentDataUpdateDto>, IDepartmentService
    {
        public DepartmentService(IRepository<Departmentmanager, int> repository) : base(repository)
        {
        }
        protected override IQueryable<Departmentmanager> CreateFilteredQuery(PageDepartmentRequestDto input)
        {
            return base.CreateFilteredQuery(input)
                .WhereIf(!string.IsNullOrEmpty(input.dep_name), c => c.dep_name.Contains(input.dep_name));      
                 
        }
    }
}
